package com.yjt.javatest.entity.vo;

import com.yjt.javatest.entity.Question;
import com.yjt.javatest.entity.Test;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TestVo extends Test {
    private List<CompleteQuestion> completeQuestions;
    private List<Question> rawQuestions;
    public TestVo(Test test) {
        this.setTestId(test.getTestId());
        this.setUserId(test.getUserId());

        this.setStartAt(test.getStartAt());
        this.setEndAt(test.getEndAt());
        this.setAnswerReleaseAt(test.getAnswerReleaseAt());
        this.setCreatedAt(test.getCreatedAt());
        this.setUpdatedAt(test.getUpdatedAt());

        this.setIsOrdered(test.getIsOrdered());

        this.setDescription(test.getDescription());
        this.setTimeLimit(test.getTimeLimit());
        this.setTitle(test.getTitle());
        this.setIsDeleted(test.getIsDeleted());
    }
}
